﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using DAL;
using System.Data.Objects;

namespace BLL 
{
			public partial class MemberListManager
		{
			MemberListService db=new MemberListService();
			public MemberList GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<MemberList> GetAll()
			{
				return db.GetAll();
			}


			public void Add(MemberList ts)
			{
			  db.Add(ts);
			}
				public void Delete(MemberList ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class advInfoManager
		{
			advInfoService db=new advInfoService();
			public advInfo GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<advInfo> GetAll()
			{
				return db.GetAll();
			}


			public void Add(advInfo ts)
			{
			  db.Add(ts);
			}
				public void Delete(advInfo ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class AreasManager
		{
			AreasService db=new AreasService();
			public Areas GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<Areas> GetAll()
			{
				return db.GetAll();
			}


			public void Add(Areas ts)
			{
			  db.Add(ts);
			}
				public void Delete(Areas ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class billTemplatesManager
		{
			billTemplatesService db=new billTemplatesService();
			public billTemplates GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<billTemplates> GetAll()
			{
				return db.GetAll();
			}


			public void Add(billTemplates ts)
			{
			  db.Add(ts);
			}
				public void Delete(billTemplates ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class birthdayremindManager
		{
			birthdayremindService db=new birthdayremindService();
			public birthdayremind GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<birthdayremind> GetAll()
			{
				return db.GetAll();
			}


			public void Add(birthdayremind ts)
			{
			  db.Add(ts);
			}
				public void Delete(birthdayremind ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class cardTemplatesManager
		{
			cardTemplatesService db=new cardTemplatesService();
			public cardTemplates GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<cardTemplates> GetAll()
			{
				return db.GetAll();
			}


			public void Add(cardTemplates ts)
			{
			  db.Add(ts);
			}
				public void Delete(cardTemplates ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class collectionManager
		{
			collectionService db=new collectionService();
			public collection GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<collection> GetAll()
			{
				return db.GetAll();
			}


			public void Add(collection ts)
			{
			  db.Add(ts);
			}
				public void Delete(collection ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class consumeSolutionManager
		{
			consumeSolutionService db=new consumeSolutionService();
			public consumeSolution GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<consumeSolution> GetAll()
			{
				return db.GetAll();
			}


			public void Add(consumeSolution ts)
			{
			  db.Add(ts);
			}
			public void Delete(consumeSolution ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class DuanxingneirongManager
		{
			DuanxingneirongService db=new DuanxingneirongService();
			public Duanxingneirong GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<Duanxingneirong> GetAll()
			{
				return db.GetAll();
			}


			public void Add(Duanxingneirong ts)
			{
			  db.Add(ts);
			}
				public void Delete(Duanxingneirong ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class EmailManager
		{
			EmailService db=new EmailService();
			public Email GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<Email> GetAll()
			{
				return db.GetAll();
			}


			public void Add(Email ts)
			{
			  db.Add(ts);
			}
				public void Delete(Email ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class foregroundingManager
		{
			foregroundingService db=new foregroundingService();
			public foregrounding GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<foregrounding> GetAll()
			{
				return db.GetAll();
			}


			public void Add(foregrounding ts)
			{
			  db.Add(ts);
			}
				public void Delete(foregrounding ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class giftAmountManager
		{
			giftAmountService db=new giftAmountService();
			public giftAmount GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<giftAmount> GetAll()
			{
				return db.GetAll();
			}


			public void Add(giftAmount ts)
			{
			  db.Add(ts);
			}
				public void Delete(giftAmount ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class giftExchangeNotesManager
		{
			giftExchangeNotesService db=new giftExchangeNotesService();
			public giftExchangeNotes GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<giftExchangeNotes> GetAll()
			{
				return db.GetAll();
			}


			public void Add(giftExchangeNotes ts)
			{
			  db.Add(ts);
			}
				public void Delete(giftExchangeNotes ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class giftsManager
		{
			giftsService db=new giftsService();
			public gifts GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<gifts> GetAll()
			{
				return db.GetAll();
			}


			public void Add(gifts ts)
			{
			  db.Add(ts);
			}
				public void Delete(gifts ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class giftsSavedManager
		{
			giftsSavedService db=new giftsSavedService();
			public giftsSaved GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<giftsSaved> GetAll()
			{
				return db.GetAll();
			}


			public void Add(giftsSaved ts)
			{
			  db.Add(ts);
			}
				public void Delete(giftsSaved ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class goodsManager
		{
			goodsService db=new goodsService();
			public goods GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<goods> GetAll()
			{
				return db.GetAll();
			}


			public void Add(goods ts)
			{
			  db.Add(ts);
			}
				public void Delete(goods ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class goodsflowingManager
		{
			goodsflowingService db=new goodsflowingService();
			public goodsflowing GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<goodsflowing> GetAll()
			{
				return db.GetAll();
			}


			public void Add(goodsflowing ts)
			{
			  db.Add(ts);
			}
				public void Delete(goodsflowing ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class goodsInfoManager
		{
			goodsInfoService db=new goodsInfoService();
			public goodsInfo GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<goodsInfo> GetAll()
			{
				return db.GetAll();
			}


			public void Add(goodsInfo ts)
			{
			  db.Add(ts);
			}
				public void Delete(goodsInfo ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class goodsTypeManager
		{
			goodsTypeService db=new goodsTypeService();
			public goodsType GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<goodsType> GetAll()
			{
				return db.GetAll();
			}


			public void Add(goodsType ts)
			{
			  db.Add(ts);
			}
				public void Delete(goodsType ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class informationShareManager
		{
			informationShareService db=new informationShareService();
			public informationShare GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<informationShare> GetAll()
			{
				return db.GetAll();
			}


			public void Add(informationShare ts)
			{
			  db.Add(ts);
			}
				public void Delete(informationShare ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class integrallistingManager
		{
			integrallistingService db=new integrallistingService();
			public integrallisting GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<integrallisting> GetAll()
			{
				return db.GetAll();
			}


			public void Add(integrallisting ts)
			{
			  db.Add(ts);
			}
				public void Delete(integrallisting ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class KaManager
		{
			KaService db=new KaService();
			public Ka GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.ID==t);
			}

			public ObjectSet<Ka> GetAll()
			{
				return db.GetAll();
			}


			public void Add(Ka ts)
			{
			  db.Add(ts);
			}
				public void Delete(Ka ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class memberInfoManager
		{
			memberInfoService db=new memberInfoService();
			public memberInfo GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<memberInfo> GetAll()
			{
				return db.GetAll();
			}


			public void Add(memberInfo ts)
			{
			  db.Add(ts);
			}
				public void Delete(memberInfo ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class MoneyStyleManager
		{
			MoneyStyleService db=new MoneyStyleService();
			public MoneyStyle GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<MoneyStyle> GetAll()
			{
				return db.GetAll();
			}


			public void Add(MoneyStyle ts)
			{
			  db.Add(ts);
			}
				public void Delete(MoneyStyle ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class operatorInfoManager
		{
			operatorInfoService db=new operatorInfoService();
			public operatorInfo GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<operatorInfo> GetAll()
			{
				return db.GetAll();
			}


			public void Add(operatorInfo ts)
			{
			  db.Add(ts);
			}
				public void Delete(operatorInfo ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class remindManager
		{
			remindService db=new remindService();
			public remind GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<remind> GetAll()
			{
				return db.GetAll();
			}


			public void Add(remind ts)
			{
			  db.Add(ts);
			}
				public void Delete(remind ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class roleInfoManager
		{
			roleInfoService db=new roleInfoService();
			public roleInfo GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<roleInfo> GetAll()
			{
				return db.GetAll();
			}


			public void Add(roleInfo ts)
			{
			  db.Add(ts);
			}
				public void Delete(roleInfo ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class SMSManager
		{
			SMSService db=new SMSService();
			public SMS GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<SMS> GetAll()
			{
				return db.GetAll();
			}


			public void Add(SMS ts)
			{
			  db.Add(ts);
			}
				public void Delete(SMS ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class sysdiagramsManager
		{
			sysdiagramsService db=new sysdiagramsService();
			public sysdiagrams GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.diagram_id==t);
			}

			public ObjectSet<sysdiagrams> GetAll()
			{
				return db.GetAll();
			}


			public void Add(sysdiagrams ts)
			{
			  db.Add(ts);
			}
				public void Delete(sysdiagrams ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class systemSettingsManager
		{
			systemSettingsService db=new systemSettingsService();
			public systemSettings GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<systemSettings> GetAll()
			{
				return db.GetAll();
			}


			public void Add(systemSettings ts)
			{
			  db.Add(ts);
			}
				public void Delete(systemSettings ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class taocanjiluManager
		{
			taocanjiluService db=new taocanjiluService();
			public taocanjilu GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<taocanjilu> GetAll()
			{
				return db.GetAll();
			}


			public void Add(taocanjilu ts)
			{
			  db.Add(ts);
			}
				public void Delete(taocanjilu ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class taocanliushuiManager
		{
			taocanliushuiService db=new taocanliushuiService();
			public taocanliushui GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<taocanliushui> GetAll()
			{
				return db.GetAll();
			}


			public void Add(taocanliushui ts)
			{
			  db.Add(ts);
			}
				public void Delete(taocanliushui ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class User_ProductwaterManager
		{
			User_ProductwaterService db=new User_ProductwaterService();
			public User_Productwater GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<User_Productwater> GetAll()
			{
				return db.GetAll();
			}


			public void Add(User_Productwater ts)
			{
			  db.Add(ts);
			}
				public void Delete(User_Productwater ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class UsersInfoManager
		{
			UsersInfoService db=new UsersInfoService();
			public UsersInfo GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<UsersInfo> GetAll()
			{
				return db.GetAll();
			}


			public void Add(UsersInfo ts)
			{
			  db.Add(ts);
			}
				public void Delete(UsersInfo ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class usersystemnodeManager
		{
			usersystemnodeService db=new usersystemnodeService();
			public usersystemnode GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<usersystemnode> GetAll()
			{
				return db.GetAll();
			}


			public void Add(usersystemnode ts)
			{
			  db.Add(ts);
			}
				public void Delete(usersystemnode ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
				public partial class wasteBookManager
		{
			wasteBookService db=new wasteBookService();
			public wasteBook GetByID(int t)
			{
				return db.GetAll().FirstOrDefault(p=>p.id==t);
			}

			public ObjectSet<wasteBook> GetAll()
			{
				return db.GetAll();
			}


			public void Add(wasteBook ts)
			{
			  db.Add(ts);
			}
				public void Delete(wasteBook ts)
			{
			  db.Delete(ts);
			}
			public void Update()
			{
			  db.SaveChanges();
			}

		}
		}